﻿using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace _01.策略模式
{
    /// <summary>
    /// 领域实体基类
    /// </summary>
    public abstract class BaseEntity : IModel
    {
        #region 00.构造器
        /// <summary>
        /// 构造器
        /// </summary>
        public BaseEntity()
        {
            this.Id = Guid.NewGuid();
        }
        #endregion

        #region 01.主键 —— Guid Id
        /// <summary>
        /// 主键
        /// </summary>
        [Key, DatabaseGenerated(DatabaseGeneratedOption.None)]
        public Guid Id { get; set; }
        #endregion
    }
}
